<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>新增歌曲</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="../static/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="../static/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
    <link href="../static/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20200727" rel="stylesheet"/>
    <link href="../static/css/animate.css" rel="stylesheet"/>
    <link href="../static/css/style.css?v=20200903" rel="stylesheet"/>
    <link href="../static/ruoyi/css/ry-ui.css?v=4.4.0" rel="stylesheet"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-music-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">歌手：</label>
                <div class="col-sm-8">
                    <select id="artist-id" name="artist" class="form-control m-b">
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">歌曲名：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">专辑：</label>
                <div class="col-sm-8">
                    <input name="album" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">歌曲时长：</label>
                <div class="col-sm-8">
                    <input name="duration" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">歌曲图片：</label>
                <div class="col-sm-8">
                    <input name="image" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <a id="scroll-up" href="#" class="btn btn-sm display"><i class="fa fa-angle-double-up"></i></a>
    <script src="../static/js/jquery.min.js"></script>
    <script src="../static/js/bootstrap.min.js"></script>
    <!-- bootstrap-table 表格插件 -->
    <script src="../static/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=20200727"></script>
    <script src="../static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=20200727"></script>
    <script src="../static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js?v=20200727"></script>
    <!-- jquery-validate 表单验证插件 -->
    <script src="../static/ajax/libs/validate/jquery.validate.min.js"></script>
    <script src="../static/ajax/libs/validate/messages_zh.min.js"></script>
    <script src="../static/ajax/libs/validate/jquery.validate.extend.js"></script>
    <!-- jquery-validate 表单树插件 -->
    <script src="../static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js"></script>
    <!-- 遮罩层 -->
    <script src="../static/ajax/libs/blockUI/jquery.blockUI.js"></script>
    <script src="../static/ajax/libs/iCheck/icheck.min.js"></script>
    <script src="../static/ajax/libs/layer/layer.min.js"></script>
    <script src="../static/ajax/libs/layui/layui.js"></script>
    <script src="../static/ruoyi/js/common.js?v=4.4.0"></script>
    <script src="../static/ruoyi/js/ry-ui.js?v=4.4.0"></script>
    <script type="text/javascript">


        let ctx = storage.get('ctx')
        var prefix = ctx + "music";
        let AURL=ctx+"artist";
        $(function () {
            $.operate.get( AURL+"/selectAll.do", function (e) {
                console.log(e);
                var language = "";
                console.log(e.data[0].name);
                $.each(e.data, function (index, val) {
                        language += "<option value=" + val.name + ">" + val.name + "</option>";
                });
                $("#artist-id").append(language);
            });
            $('#artist-id').on('changed.bs.select', function (e) {
            });
        });

        $("#form-music-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/insert.do", $('#form-music-add').serialize());
            }
        }
    </script>
</body>
</html>